fix(ui-kit): stop useStreamingText cancel() from overwriting a settled status - #10121
Conversation
…d status cancel() only guarded against the per-effect cancelled flag, so once a stream reached idle/done/error it would still accept a later cancel() and overwrite the terminal status with "cancelled" - clobbering a completed stream, hiding a real error behind an inconsistent cancelled+error pair, or flipping an idle hook that never started a stream. Track settling with its own per-effect flag and gate cancelRef on it, so cancel() is a no-op once the stream has settled.
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-31 08:07:36 UTC
Review summary Nits — 4 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
fix(ui-kit): stop useStreamingText cancel() from overwriting a settled status
cancel() only guarded against the per-effect cancelled flag, so once a stream
reached idle/done/error it would still accept a later cancel() and overwrite
the terminal status with "cancelled" - clobbering a completed stream, hiding a
real error behind an inconsistent cancelled+error pair, or flipping an idle
hook that never started a stream. Track settling with its own per-effect flag
and gate cancelRef on it, so cancel() is a no-op once the stream has settled.
Closes #10050